#ifndef DOMITEM_H
#define DOMITEM_H

#include <QDomNode>
#include <QHash>
#include <QList>
#include <QVariant>
#include <QVector>

class JDomItem
{
public:
    JDomItem(QDomNode &node, int row, JDomItem *parent = 0);
    ~JDomItem();

    JDomItem *child(int i);
    JDomItem *parent();
    QDomNode node() const;
    int row();

	QVariant data(int column) const;
	bool setData(int column, const QVariant &value);

	bool insertChildren(int position, int count, int columns);
	bool removeChildren(int position, int count);

	int childCount() const;
	//int childNumber() const;

private:
    QDomNode domNode;
    QHash<int,JDomItem*> childItems;
	//QList<JDomItem*> childItems;
    JDomItem *parentItem;
	QVector<QVariant> itemData;
    int rowNumber;
};

#endif
